<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <title>TTS</title>
</head>

<body>
    <div class="app">
        <h1>Apache Cordova</h1>
        <div id="deviceready" class="blink">
            <p class="event listening">Connecting to Device</p>
            <p class="event received">Device is Ready</p>
            <textarea id="txt" style="width: 100%;height: 80px;">你好，世界!</textarea>
            <input type="button" value="tts"
              style="padding: 30px;display: block;min-height: 60px;min-width: 120px;margin: auto;"
              onclick="tts()">
        </div>
    </div>
    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
</body>
<script>
function tts() {
	XunfeiTTS.speakOut(document.getElementById('txt').value);
}
</script>
</html>
